package com.googlecode.ws.tester.xor.engine.model;

/**
 * Created by IntelliJ IDEA.
 * User: pablo
 * Date: 2009-06-09
 * Time: 18:43:20
 */
public class Namespace {
    private String prefix;
    private String uri;

    public Namespace() {
    }

    public String getPrefix() {
        return prefix;
    }

    public void setPrefix(String prefix) {
        this.prefix = prefix;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Namespace namespace = (Namespace) o;

        if (!prefix.equals(namespace.prefix)) return false;
        if (!uri.equals(namespace.uri)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = prefix.hashCode();
        result = 31 * result + uri.hashCode();
        return result;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        sb.append("Namespace");
        sb.append("{prefix='").append(prefix).append('\'');
        sb.append(", uri='").append(uri).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
